Integrand size = 35, antiderivative size = 295 \[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {2 b \sqrt {1-c^2 x^2} (a+b \arcsin (c x)) \log \left (1+e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i b^2 \sqrt {1-c^2 x^2} \operatorname {PolyLog}\left (2,-e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \]
[Out]
Time = 0.51 (sec) , antiderivative size = 295, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.229, Rules used = {4823, 4791, 4737, 4765, 3800, 2221, 2317, 2438} \[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {c d x+d} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {c d x+d} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {c d x+d} \sqrt {e-c e x}}+\frac {2 b \sqrt {1-c^2 x^2} \log \left (1+e^{2 i \arcsin (c x)}\right ) (a+b \arcsin (c x))}{c^3 d e \sqrt {c d x+d} \sqrt {e-c e x}}-\frac {i b^2 \sqrt {1-c^2 x^2} \operatorname {PolyLog}\left (2,-e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {c d x+d} \sqrt {e-c e x}} \]
[In]
[Out]
Rule 2221
Rule 2317
Rule 2438
Rule 3800
Rule 4737
Rule 4765
Rule 4791
Rule 4823
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {1-c^2 x^2} \int \frac {x^2 (a+b \arcsin (c x))^2}{\left (1-c^2 x^2\right )^{3/2}} \, dx}{d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} \int \frac {(a+b \arcsin (c x))^2}{\sqrt {1-c^2 x^2}} \, dx}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\left (2 b \sqrt {1-c^2 x^2}\right ) \int \frac {x (a+b \arcsin (c x))}{1-c^2 x^2} \, dx}{c d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\left (2 b \sqrt {1-c^2 x^2}\right ) \text {Subst}(\int (a+b x) \tan (x) \, dx,x,\arcsin (c x))}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {\left (4 i b \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {e^{2 i x} (a+b x)}{1+e^{2 i x}} \, dx,x,\arcsin (c x)\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {2 b \sqrt {1-c^2 x^2} (a+b \arcsin (c x)) \log \left (1+e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\left (2 b^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \log \left (1+e^{2 i x}\right ) \, dx,x,\arcsin (c x)\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {2 b \sqrt {1-c^2 x^2} (a+b \arcsin (c x)) \log \left (1+e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {\left (i b^2 \sqrt {1-c^2 x^2}\right ) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ & = \frac {x (a+b \arcsin (c x))^2}{c^2 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i \sqrt {1-c^2 x^2} (a+b \arcsin (c x))^2}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {\sqrt {1-c^2 x^2} (a+b \arcsin (c x))^3}{3 b c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}+\frac {2 b \sqrt {1-c^2 x^2} (a+b \arcsin (c x)) \log \left (1+e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}}-\frac {i b^2 \sqrt {1-c^2 x^2} \operatorname {PolyLog}\left (2,-e^{2 i \arcsin (c x)}\right )}{c^3 d e \sqrt {d+c d x} \sqrt {e-c e x}} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(636\) vs. \(2(295)=590\).
Time = 3.43 (sec) , antiderivative size = 636, normalized size of antiderivative = 2.16 \[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\frac {3 a^2 c \sqrt {d} e x+3 a^2 \sqrt {e} \sqrt {d+c d x} \sqrt {e-c e x} \arctan \left (\frac {c x \sqrt {d+c d x} \sqrt {e-c e x}}{\sqrt {d} \sqrt {e} \left (-1+c^2 x^2\right )}\right )+3 a b \sqrt {d} e \left (2 c x \arcsin (c x)+\sqrt {1-c^2 x^2} \left (-\arcsin (c x)^2+2 \left (\log \left (\cos \left (\frac {1}{2} \arcsin (c x)\right )-\sin \left (\frac {1}{2} \arcsin (c x)\right )\right )+\log \left (\cos \left (\frac {1}{2} \arcsin (c x)\right )+\sin \left (\frac {1}{2} \arcsin (c x)\right )\right )\right )\right )\right )+b^2 \sqrt {d} e \left (6 i \pi \sqrt {1-c^2 x^2} \arcsin (c x)+3 c x \arcsin (c x)^2-3 i \sqrt {1-c^2 x^2} \arcsin (c x)^2-\sqrt {1-c^2 x^2} \arcsin (c x)^3+12 \pi \sqrt {1-c^2 x^2} \log \left (1+e^{-i \arcsin (c x)}\right )+3 \pi \sqrt {1-c^2 x^2} \log \left (1-i e^{i \arcsin (c x)}\right )+6 \sqrt {1-c^2 x^2} \arcsin (c x) \log \left (1-i e^{i \arcsin (c x)}\right )-3 \pi \sqrt {1-c^2 x^2} \log \left (1+i e^{i \arcsin (c x)}\right )+6 \sqrt {1-c^2 x^2} \arcsin (c x) \log \left (1+i e^{i \arcsin (c x)}\right )-12 \pi \sqrt {1-c^2 x^2} \log \left (\cos \left (\frac {1}{2} \arcsin (c x)\right )\right )+3 \pi \sqrt {1-c^2 x^2} \log \left (-\cos \left (\frac {1}{4} (\pi +2 \arcsin (c x))\right )\right )-3 \pi \sqrt {1-c^2 x^2} \log \left (\sin \left (\frac {1}{4} (\pi +2 \arcsin (c x))\right )\right )-6 i \sqrt {1-c^2 x^2} \operatorname {PolyLog}\left (2,-i e^{i \arcsin (c x)}\right )-6 i \sqrt {1-c^2 x^2} \operatorname {PolyLog}\left (2,i e^{i \arcsin (c x)}\right )\right )}{3 c^3 d^{3/2} e^2 \sqrt {d+c d x} \sqrt {e-c e x}} \]
[In]
[Out]
\[\int \frac {x^{2} \left (a +b \arcsin \left (c x \right )\right )^{2}}{\left (c d x +d \right )^{\frac {3}{2}} \left (-c e x +e \right )^{\frac {3}{2}}}d x\]
[In]
[Out]
\[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\int { \frac {{\left (b \arcsin \left (c x\right ) + a\right )}^{2} x^{2}}{{\left (c d x + d\right )}^{\frac {3}{2}} {\left (-c e x + e\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\int \frac {x^{2} \left (a + b \operatorname {asin}{\left (c x \right )}\right )^{2}}{\left (d \left (c x + 1\right )\right )^{\frac {3}{2}} \left (- e \left (c x - 1\right )\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
\[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\int { \frac {{\left (b \arcsin \left (c x\right ) + a\right )}^{2} x^{2}}{{\left (c d x + d\right )}^{\frac {3}{2}} {\left (-c e x + e\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x^2 (a+b \arcsin (c x))^2}{(d+c d x)^{3/2} (e-c e x)^{3/2}} \, dx=\int \frac {x^2\,{\left (a+b\,\mathrm {asin}\left (c\,x\right )\right )}^2}{{\left (d+c\,d\,x\right )}^{3/2}\,{\left (e-c\,e\,x\right )}^{3/2}} \,d x \]
[In]
[Out]